(ns mdc.common.test-expect.test-utils
 (:use clojure.contrib.test-is))

(defmacro assert-called [fn-name called? & body]
  `(let [called-status?# (atom false)]
     (binding [~fn-name (fn [& args#] (swap! called-status?# (fn [& args#] true)))] ~@body)
     (is (= ~called? @called-status?#))))

